package com.yanqu.road.server.cmd.activity.doublespring.cross;

import com.yanqu.road.entity.enums.eGamePlayerEventType;
import com.yanqu.road.entity.player.UserBaseInfo;
import com.yanqu.road.logic.pb.PlayerBasePb;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.DoubleSpringProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.CmdApi;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.activity.doublespring.DoubleSpringActivityMgr;
import com.yanqu.road.server.manger.player.UserMgr;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_DOUBLE_SPRING_UPDATE_SCORE_FROM_CROSS,desc = "踏春游记-跨服返回-玩家更新积分")
public class DoubleSpringTravelUpdateScoreFromCrossCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        DoubleSpringProto.DoubleSpringCrossUpdateUserScoreSyncMsg reqMsg = DoubleSpringProto.DoubleSpringCrossUpdateUserScoreSyncMsg.parseFrom(packet.getBytes());
        DoubleSpringActivityMgr.updateScore(packet.getPlayerId(), reqMsg.getScore(), reqMsg.getActivityId(), reqMsg.getAddScore(), reqMsg.getPartnerUserId(), reqMsg.getTravelFlag());
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
